package com.thoughtsFromThePot;

import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;

public class thoughtContainer implements Parcelable{
	private String thought;
	private String username;
	private String date;
	private int id;
	private int likes;
	private int dislikes;
	
	public void writeToParcel(Parcel dest, int flags) {
		//Log.v(TAG, "writeToParcel..."+ flags);
		dest.writeString(thought);
		dest.writeString(username);
		dest.writeString(date);
		dest.writeInt(id);
		dest.writeInt(likes);
		dest.writeInt(dislikes);
	}
	
	public class MyCreator implements Parcelable.Creator<thoughtContainer> {
	      public thoughtContainer createFromParcel(Parcel source) {
	            return new thoughtContainer(source);
	      }
	      public thoughtContainer[] newArray(int size) {
	            return new thoughtContainer[size];
	      }
	}
	
	thoughtContainer (Parcel source) {
		thought = source.readString();
		username = source.readString();
		date = source.readString();
		id = source.readInt();
		likes = source.readInt();
		dislikes = source.readInt();
	}
	
	public thoughtContainer () {
		thought = "";
		username = "";
		date = "";
		id = 0;
		likes = 0;
		dislikes = 0;
	}
	
	public String getThought() {
		return thought;
	}
	
	public String getUsername() {
		return username;
	}
	
	public String getDate() {
		return date;
	}
	
	public int getId() {
		return id;
	}
	
	public int getLikes() {
		return likes;
	}
	
	public int getDislikes() {
		return dislikes;
	}
	
	public void setThought(String thought) {
		this.thought = thought;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
	public void setDate(String date) {
		this.date = date;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	public void setLikes(int likes) {
		this.likes = likes;
	}
	
	public void setDislikes(int dislikes) {
		this.dislikes = dislikes;
	}

	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}
}

